package com.ruoyi.shanghuliebiao2.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

/**
 * 优惠券管理对象 che_coupon
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
public class CheCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键、自增 */
    private Long id;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 优惠卷类型（满减卷、打折卷）（**数字字典**） */
    @Excel(name = "优惠卷类型", readConverterExp = "满=减卷、打折卷")
    private Integer type;

    /** 折扣 */
    @Excel(name = "折扣")
    private Integer discount;

    /** 满减 */
    @Excel(name = "满减")
    private Integer full;

    /** 优惠价格 */
    @Excel(name = "优惠价格")
    private Integer reduce;

    /** 发放开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 发放结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 投放数量 */
    @Excel(name = "投放数量")
    private Integer counted;

    /** 每人限领 */
    @Excel(name = "每人限领")
    private Integer limited;

    /** 发放店铺 id  外键（仅限XX使用） 【外键】 */
    @Excel(name = "发放店铺 id  外键", readConverterExp = "仅=限XX使用")
    private Long shopId;

    /** 使用开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useTime;

    /** 使用结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useendTime;

    /** 状态 */
    @Excel(name = "状态")
    private Integer state;
    @Transient
    private CheShop cheShop;

    public CheShop getCheShop() {
        return cheShop;
    }

    public void setCheShop(CheShop cheShop) {
        this.cheShop = cheShop;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setDiscount(Integer discount) 
    {
        this.discount = discount;
    }

    public Integer getDiscount() 
    {
        return discount;
    }
    public void setFull(Integer full) 
    {
        this.full = full;
    }

    public Integer getFull() 
    {
        return full;
    }
    public void setReduce(Integer reduce) 
    {
        this.reduce = reduce;
    }

    public Integer getReduce() 
    {
        return reduce;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setCounted(Integer counted) 
    {
        this.counted = counted;
    }

    public Integer getCounted() 
    {
        return counted;
    }
    public void setLimited(Integer limited) 
    {
        this.limited = limited;
    }

    public Integer getLimited() 
    {
        return limited;
    }
    public void setShopId(Long shopId) 
    {
        this.shopId = shopId;
    }

    public Long getShopId() 
    {
        return shopId;
    }
    public void setUseTime(Date useTime) 
    {
        this.useTime = useTime;
    }

    public Date getUseTime() 
    {
        return useTime;
    }
    public void setUseendTime(Date useendTime) 
    {
        this.useendTime = useendTime;
    }

    public Date getUseendTime() 
    {
        return useendTime;
    }
    public void setState(Integer state) 
    {
        this.state = state;
    }

    public Integer getState() 
    {
        return state;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("type", getType())
            .append("discount", getDiscount())
            .append("full", getFull())
            .append("reduce", getReduce())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("counted", getCounted())
            .append("limited", getLimited())
            .append("shopId", getShopId())
            .append("useTime", getUseTime())
            .append("useendTime", getUseendTime())
            .append("state", getState())
            .toString();
    }
}
